Imports System.Data.SqlClient
Public Class dCategoriaFiscal
    Public Function Insertar(ByVal Detalle As String) As Boolean
        Dim Parametros As ArrayList = New ArrayList
        Parametros.Add(New SqlParameter("@pEDetalle", Detalle))
        Return dConexion.ABM("STORE_TblCategoriaFiscalAlta", Parametros)
    End Function
    Public Function Eliminar(ByVal CodigoCategoria As String) As Boolean
        Dim Parametros As ArrayList = New ArrayList
        Parametros.Add(New SqlParameter("@pECodigoCategoria", CodigoCategoria))
        Return dConexion.ABM("STORE_TblCategoriaFiscalEliminar", Parametros)
    End Function
    Public Function Modificar(ByVal Detalle As String) As Boolean
        Dim Parametros As ArrayList = New ArrayList

        If Detalle <> "" Then
            Parametros.Add(New SqlParameter("@pEDetalle", Detalle))
        End If

        Return dConexion.ABM("STORE_TblCategoriaFiscalModificar", Parametros)
    End Function
    Public Function BuscarFiltrado(ByVal CodigoCategoria As String, ByVal Detalle As String) As DataSet
        Dim Parametros As ArrayList = New ArrayList

        If CodigoCategoria <> "" Then
            Parametros.Add(New SqlParameter("@pECodigoCategoria", CodigoCategoria))
        End If
        If Detalle <> "" Then
            Parametros.Add(New SqlParameter("@pEDetalle", Detalle))
        End If

        Return dConexion.Consultar("STORE_TblCategoriaFiscalBuscarFiltrado", Parametros)
    End Function
End Class
